import _csv

with open(r'/home/eric/a.csv', encoding="utf-8") as csvfile:
    readCSV = _csv.reader(csvfile, delimiter=',')
    for row in readCSV:
        print(row)

with open("XXX.csv", "w", newline="") as datacsv:
    csvwriter = _csv.writer(datacsv)
    csvwriter.writerow(["A", "B", "C", "D"])
